﻿using System;
using System.Collections.Generic; 
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Runda.EShop.Common.Entity;
using Runda.EShop.Bll;

namespace Runda.EShop.SaaS.UserControl
{
    public partial class Location : UserControlBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                SystemBll bll = new SystemBll();
                SysFunctionEntity entity = null;
                if (!string.IsNullOrEmpty(base.Page.FunctionID))
                {
                    entity = bll.GetFunctionWithPath(base.Page.FunctionID);
                }
                else
                {
                    entity = bll.GetFunctionWithByUrl(base.Page.CurrentAppPath);
                }
                if (entity != null)
                {
                    ltlTitle.Text = entity.FuncName;
                    ltlLocation.Text = entity.Location;
                }
            }
        }

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.Load += new EventHandler(Page_Load);
        }
    }
}